package org.dromara.xhlj.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.xhlj.domain.XhljActivityTask;
import org.dromara.xhlj.domain.XhljActivityTaskTemplate;
import org.dromara.xhlj.domain.XhljActivity;
import org.dromara.xhlj.domain.XhljActivityUserParticipation;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.dromara.common.core.utils.tree.TreeCruxField;
import org.dromara.wx.domain.WxUser;
import org.dromara.wx.domain.vo.WxUserVo;
import org.dromara.system.domain.SysUser;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 活动任务视图对象 xhlj_activity_task
 *
 * @author yf
 * @date 2024-07-28
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = XhljActivityTask.class)
public class XhljActivityTaskVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 任务ID
     */
    @ExcelProperty(value = "任务ID")
    private Integer taskId;
    /**
     * 任务模版ID
     */
    @ExcelProperty(value = "任务模版ID")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Translation(type = XhljActivityTaskTemplate.TRANS_ID_TO_VO, mapper = "activityTaskTemplateId")
    private XhljActivityTaskTemplateVo activityTaskTemplate;
    private Integer activityTaskTemplateId;
    /**
     * 创建人sys_user（大会管理员/活动负责人）
     */
    @ExcelProperty(value = "创建人sys_user")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Translation(type = SysUser.TRANS_ID_TO_VO, mapper = "createBy")
    private SysUserVo sysUser;
    private Integer createBy;
    /**
     * 活动ID
     */
    @ExcelProperty(value = "活动ID")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Translation(type = XhljActivity.TRANS_ID_TO_VO, mapper = "activityId")
    private XhljActivityVo activity;
    private Integer activityId;
    /**
     * 任务周期类型（0=限时任务，1=每日任务，2=限定任务）
     */
    @ExcelProperty(value = "任务周期类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "task_cycle_type")
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, other = "task_cycle_type", mapper = "taskCycleType")
    private String taskCycleTypeDictData;
    private String taskCycleType;
    /**
     * 完成标识（二维码/打卡图片）
     */
    @ExcelProperty(value = "完成标识")
    private String finishImage;
    /**
     * 完成标识（验证码）
     */
    @ExcelProperty(value = "完成标识")
    private String finishCode;
    /**
     * 完成标识（地点）
     */
    @ExcelProperty(value = "完成标识")
    private String finishMap;
    /**
     * 任务开始时间
     */
    @ExcelProperty(value = "任务开始时间")
    private Date startTime;
    /**
     * 任务结束时间
     */
    @ExcelProperty(value = "任务结束时间")
    private Date endTime;
    /**
     * 发布状态（0=未发布，1=已发布）
     */
    @ExcelProperty(value = "发布状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "publish_status")
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, other = "publish_status", mapper = "publishStatus")
    private String publishStatusDictData;
    private String publishStatus;
    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createdTime;
    /**
     * 任务状态（0=进行中，1=已结束）
     */
    @ExcelProperty(value = "任务状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "task_status")
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, other = "task_status", mapper = "taskStatus")
    private String taskStatusDictData;
    private String taskStatus;
    /**
     * 活动参与 子列表
     */
    @JsonIgnore
    @Translation(type = XhljActivityUserParticipation.TRANS_ID_TO_VO_LIST, mapper = "taskId" , other = "activity_task_id")
    private List<XhljActivityUserParticipationVo> xhljActivityUserParticipationVoList;
}
